<template>
  <div>
    <jxf-titletip :title="title" :hasRefresh="false" :hasGoBack="true" @goBack="goPrewBack"></jxf-titletip>
    <el-form :model="companySInfo" ref="companySInfo" class="company mt20" label-width="160px">
      <el-form-item label="地区:" prop="cityName" required>
        <el-input v-model="companySInfo.cityName" ref="input-cityName" disabled></el-input>
      </el-form-item>
      <el-form-item label="方案名称:" prop="planName" required>
        <el-input v-model="companySInfo.planName" ref="input-planName" disabled></el-input>
      </el-form-item>
      <el-form-item label="初始公里:" prop="firstKm" required>
        <el-input v-model="companySInfo.firstKm" ref="input-firstKm" disabled>
          <template slot="append">公里</template>
        </el-input>
      </el-form-item>
      <el-form-item label="初始公里对应运费:" prop="firstKmPrice" required>
        <el-input v-model="companySInfo.firstKmPrice" ref="input-firstKmPrice" disabled>
          <template slot="append">元</template>
        </el-input>
      </el-form-item>
      <el-form-item label="增加公里:" prop="leftKm" required>
        <el-input v-model="companySInfo.leftKm" ref="input-leftKm" disabled>
          <template slot="append">公里</template>
        </el-input>
      </el-form-item>
      <el-form-item label="增加运费:" prop="leftKmPrice" required>
        <el-input v-model="companySInfo.leftKmPrice" ref="input-leftKmPrice" disabled>
          <template slot="append">元</template>
        </el-input>
      </el-form-item>
      <!--<el-form-item>-->
        <!--<el-button type="primary">保存</el-button>-->
      <!--</el-form-item>-->
    </el-form>
  </div>
</template>

<script>
    export default {
        name: "CompanySetting",
        props: {
          dataInfo: {
            type: Object,
            default: () => {}
          }
        },
        data() {
          return {
            title: "城市与运费管理",
            companySInfo: this.dataInfo
          }
        },
        methods: {
          getData() {

          },
          goPrewBack() {
            this.$emit('goBack')
          },
          onSearch() {
            this.getData()
          },
          resetForm(formName) {
            this.$refs[formName].resetFields()
          }
        },
        watch: {
          dataInfo() {
            this.companySInfo = this.dataInfo
          }
        },
        created() {

        }
    }
</script>

<style lang="scss" scoped>
.company {
  width: 500px;
}
</style>
